

package com.hazelcast.jet;

import com.hazelcast.cluster.Member;
import com.hazelcast.function.PredicateEx;

/**
 * Selects the members on which a specific job will run.
 *
 * @see JetService.JobBuilder#withMemberSelector(JetMemberSelector)
 * @since 5.5
 */
@FunctionalInterface
public interface JetMemberSelector extends PredicateEx<Member> {

    /**
     * Selects all lite members on the cluster.
     */
    JetMemberSelector ALL_LITE_MEMBERS = Member::isLiteMember;

    /**
     * Predicate to select members on which the job will run.
     */
    @Override
    boolean testEx(Member member);
}
